home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
tls
/
tls013.ltr
< prev
next >
Wrap
Text File
|
1994-09-02
|
2KB
|
67 lines
Cmdopts OSF/Motif example program.
==================================
DISCLAIMER
This directory contains UNSUPPORTED example programs.
Software in this directory is provided in source form only. SCO does not
guarantee that the software contained here is suitable for any particular
purpose, and does not undertake to provide support for it. SCO does not
guarantee that the software will compile or run on any particular system.
---------------------------------------------------------------------------
Files:
------
Makefile makefile for example program
def.g BNF of command definition language.
def.l LEX tokeniser definition
def.y YACC grammar for definition language
cmds.def Example command definitions file
main.c Main program
interface.c Interface setup code
dialog.c Dynamic stuff
To run:
-------
cmdopts < cmds.def
Overview:
---------
The program reads a file of command definitions from stdin, creating
a parse tree. The interface is set up, and the commands list
box is filled from the tree.
When a command is selected, a series of widgets is created dynamically
according to the descriptions stored in the appropriate segment of
the parse tree. Callbacks are set up which build the command string,
and display it in a window.
The command may be executed either in an xterm or in background. Current
directory change and basic I/O redirection (< and >) are supported,
but the program is a long way from being a graphical UNIX shell !
Bugs:
-----
The activate Callback associated with the text widget in the dialog
to change working directory doesn't work.
There is a problem running commands which perform input inside an xterm:
they hang the window manager and the application. Running in background
means that input is still attached to the xterm from which cmdopts was
run: this seems to work OK.
Running xwd from cmdopts doesn't work: an X error is generated when it
tries to grab the pointer device.
The command definition language is not capable of describing some
UNIX commands adequately (e.g. tar), and could be improved in a number
of ways. Error reporting on syntax errors is abysmal: binary chop the
commands file to find the source of the error.